<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "{{%rpt_sumadbyday}}".
 *
 * @property integer $id
 * @property integer $distributiontype
 * @property integer $logfrom
 * @property integer $adspaceid
 * @property integer $solutionid
 * @property string $creativeuuid
 * @property integer $exchangeid
 * @property integer $dealid
 * @property integer $campaign_id
 * @property string $seller_name
 * @property string $adspace_name
 * @property string $base_price
 * @property string $solution_name
 * @property integer $advertiser_id
 * @property string $campaign_name
 * @property string $advertiser_name
 * @property string $creative_name
 * @property integer $reqs
 * @property integer $bids
 * @property integer $shows
 * @property string $origin_cost
 * @property string $cost
 * @property integer $clicks
 * @property string $logdate
 * @property integer $logdate_id
 * @property integer $quarter
 * @property integer $week
 * @property integer $month
 * @property integer $flag
 * @property integer $tableFlag
 * @property integer $dbflag
 * @property string $created
 * @property string $modified
 * @property integer $creator
 * @property string $creator_name
 * @property integer $label_id
 * @property string $campaign_label_name
 * @property integer $ad_network_adspace_id
 */
class RptSumadbyday extends \app\models\BaseAR
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%rpt_sumadbyday}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['distributiontype', 'logfrom', 'adspaceid', 'solutionid', 'exchangeid', 'dealid', 'campaign_id', 'advertiser_id', 'reqs', 'bids', 'shows', 'clicks', 'logdate_id', 'quarter', 'week', 'month', 'flag', 'tableFlag', 'dbflag', 'creator', 'label_id', 'ad_network_adspace_id'], 'integer'],
            [['origin_cost', 'cost'], 'number'],
            [['logdate', 'logdate_id', 'quarter', 'week', 'month', 'created', 'modified'], 'required'],
            [['logdate', 'created', 'modified'], 'safe'],
            [['creativeuuid'], 'string', 'max' => 200],
            [['seller_name', 'adspace_name', 'solution_name', 'campaign_name', 'advertiser_name', 'creative_name'], 'string', 'max' => 40],
            [['base_price'], 'string', 'max' => 32],
            [['creator_name', 'campaign_label_name'], 'string', 'max' => 64]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'distributiontype' => 'Distributiontype',
            'logfrom' => 'Logfrom',
            'adspaceid' => 'Adspaceid',
            'solutionid' => 'Solutionid',
            'creativeuuid' => 'Creativeuuid',
            'exchangeid' => 'Exchangeid',
            'dealid' => 'Dealid',
            'campaign_id' => 'Campaign ID',
            'seller_name' => 'Seller Name',
            'adspace_name' => 'Adspace Name',
            'base_price' => 'Base Price',
            'solution_name' => 'Solution Name',
            'advertiser_id' => 'Advertiser ID',
            'campaign_name' => 'Campaign Name',
            'advertiser_name' => 'Advertiser Name',
            'creative_name' => 'Creative Name',
            'reqs' => 'Reqs',
            'bids' => 'Bids',
            'shows' => 'Shows',
            'origin_cost' => 'Origin Cost',
            'cost' => 'Cost',
            'clicks' => 'Clicks',
            'logdate' => 'Logdate',
            'logdate_id' => 'Logdate ID',
            'quarter' => 'Quarter',
            'week' => 'Week',
            'month' => 'Month',
            'flag' => 'Flag',
            'tableFlag' => 'Table Flag',
            'dbflag' => 'Dbflag',
            'created' => 'Created',
            'modified' => 'Modified',
            'creator' => 'Creator',
            'creator_name' => 'Creator Name',
            'label_id' => 'Label ID',
            'campaign_label_name' => 'Campaign Label Name',
            'ad_network_adspace_id' => 'Ad Network Adspace ID',
        ];
    }
}
